import tensorflow as tf
import numpy as np

# numpy的内容转化为一个张量
n1 = np.arange(0,12)
print(n1)

t1 = tf.constant(n1)
print(t1)

# 张量的内容转化为一个numpy
t2 = tf.constant([[[1,2],[3,4]]])

n2 = t2.numpy()
print(n2)